import 'package:nyh_motorcade_app/entity/user_info_entity.dart';

userInfoEntityFromJson(UserInfoEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'].toString();
	}
	if (json['headquarterGroupId'] != null) {
		data.headquarterGroupId = json['headquarterGroupId'].toString();
	}
	if (json['loginPhone'] != null) {
		data.loginPhone = json['loginPhone'].toString();
	}
	if (json['username'] != null) {
		data.username = json['username'].toString();
	}
	if (json['icon'] != null) {
		data.icon = json['icon'].toString();
	}
	if (json['companyIds'] != null) {
		data.companyIds = json['companyIds'];
	}
	if (json['viewHomePageData'] != null) {
		data.viewHomePageData = json['viewHomePageData'];
	}
	if (json['logo'] != null) {
		data.logo = json['logo'].toString();
	}
	if (json['isAdmin'] != null) {
		data.isAdmin = json['isAdmin'];
	}
	if (json['companyId'] != null) {
		data.companyId = json['companyId'].toString();
	}
	if (json['companyName'] != null) {
		data.companyName = json['companyName'].toString();
	}
	if (json['companyCode'] != null) {
		data.companyCode = json['companyCode'].toString();
	}
	return data;
}

Map<String, dynamic> userInfoEntityToJson(UserInfoEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['headquarterGroupId'] = entity.headquarterGroupId;
	data['loginPhone'] = entity.loginPhone;
	data['username'] = entity.username;
	data['icon'] = entity.icon;
	data['companyIds'] = entity.companyIds;
	data['viewHomePageData'] = entity.viewHomePageData;
	data['logo'] = entity.logo;
	data['isAdmin'] = entity.isAdmin;
	data['companyId'] = entity.companyId;
	data['companyName'] = entity.companyName;
	data['companyCode'] = entity.companyCode;
	return data;
}